<?php // @version $Id: default_login.php 12352 2009-06-24 13:52:57Z ian $
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<div id="subHeader">
	<div class="login" style="width:290px; margin-left:40px;">
		<img alt="Sartu" src="<?php echo JURI::root();?>templates/lingolangtemplate/images/kandadoa.jpg">
		<div class="selected">Sartu zure kontuan</div>
	</div>
</div>
<div id="left">
	<div id="menu">
		<ul>
		<?php
			$db =& JFactory::getDBO();
			$query = "SELECT *
						FROM `#__hizkuntzak_languages`
						WHERE `#__hizkuntzak_languages`.`active`=1
						ORDER BY `#__hizkuntzak_languages`.`name_eu` ASC";
			$db->setQuery( $query );
			$langus=$db->loadObjectList();

			$color = 0;
			$text_color = "gorria";
			foreach($langus as $la){
				if ($color == 0) {
					$text_color = "gorria";
					$color++;
				}else if($color == 1){
					$text_color = "morea";
					$color++;
				}else if ($color == 2) {
					$text_color = "laranja";
					$color++;
				}else if ($color == 3) {
					$text_color = "urdina";
					$color++;
				}else if ($color == 4) {
					$text_color = "berdea";
					$color = 0;
				}
				print("<li ><a class='$text_color' href='index.php?option=com_hizkuntzak&task=mainMenu&hlang=$la->iso_code'>$la->name_eu</a></li><br/>");
			};
		?>
		</ul>
	</div>
</div>
<div id="content" style="margin-top:-40px;">
		<form action="<?php echo JRoute::_( 'index.php', true, $this->params->get('usesecure')); ?>" method="post" name="login" id="login" class="login_form<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
			<div class="logleft">
				<div class="logname">
					<label for="user" >Erabiltzailea: </label>
					<input name="username" type="text" class="inputbox"  id="user" />
				</div>
				<div class="logpass">
					<label for="pass" >Pasahitza: </label>
					<input name="passwd" type="password" class="inputbox" id="pass" />
				</div>
				<div class="remember">
					<div class="remleft">
						<label for="rem">Gogora nazazu: </label>
						<input type="checkbox" checked="checked" name="remember" class="inputbox" value="yes" id="rem" />
					</div>
					<input type="submit" class="button" value="Sartu">
				</div>
			</div>
			<div class="logright"></div>
			<p class="forgot">
				<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset&lang=eu#content' ); ?>">
					<?php JPlugin::loadLanguage( 'tpl_beez' ); echo 'Pasahitza ahaztu duzu?'; ?>
				</a>
			</p>
			<noscript><?php echo JText::_( 'WARNJAVASCRIPT' ); ?></noscript>
			<input type="hidden" name="option" value="com_user" />
			<input type="hidden" name="task" value="login" />
			<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
			<?php echo JHTML::_( 'form.token' ); ?>
		</form>
</div>